package com.koron.order.experiment.service;

import com.github.pagehelper.PageInfo;
import com.koron.bean.query.PageQuery;
import com.koron.common.core.business.common.service.CommonService;
import com.koron.order.common.bean.po.OrderDispatch;
import com.koron.order.experiment.bean.dto.ExperimentDetailDto;
import com.koron.order.experiment.bean.po.ExperimentPo;
import com.koron.order.experiment.bean.query.ExperimentQuery;
import com.koron.order.experiment.bean.vo.ExperimentDetailVo;
import com.koron.order.experiment.bean.vo.ExperimentVo;
import com.koron.order.experiment.bean.vo.ReviewVo;
import org.koron.ebs.mybatis.SessionFactory;

import java.util.List;

/**
 * (Experiment)表服务接口
 *
 * @author zhouj
 * @since 2021-10-08 16:25:04
 */
public interface ExperimentService extends CommonService {

    int insertOrUpdate(SessionFactory factory, ExperimentPo experiment);

    int insertOrUpdateBatch(SessionFactory factory, List<ExperimentPo> experimentList);

    int insert(SessionFactory factory, ExperimentPo experiment);

    int insertBatch(SessionFactory factory, List<ExperimentPo> experiments);

    int update(SessionFactory factory, ExperimentPo experiment);

    boolean updateStatus(SessionFactory factory, String id, String status);

    int deleteById(SessionFactory factory, String id);

    ExperimentDetailVo queryById(SessionFactory factory, String id);

    PageInfo<ExperimentVo> queryPageList(SessionFactory factory, ExperimentQuery query, PageQuery pageQuery);

    List<ExperimentVo> queryList(SessionFactory factory, ExperimentQuery query);

    int submitExperiment(SessionFactory factory, String orderId, String status, OrderDispatch dto);

    String insertOrUpdateDetail(SessionFactory factory, ExperimentDetailDto dto);

    ExperimentPo queryExperimentBeanById(SessionFactory factory, String orderId);

    ReviewVo queryReviewInfoByOrderId(SessionFactory factory, String orderId);

}
